﻿using Microsoft.AspNetCore.Mvc;
using workflowbackend.CommonControllers;

namespace workflowbackend.Controllers
{
    public class ExceptionController : CommonController<ExceptionController>
    {
        public ExceptionController(ILogger<ExceptionController> logger) : base(logger)
        {
        }

        [HttpGet("Exception")]
        public IActionResult Index()
        {
            _logger.LogInformation("异常");
            throw new Exception("抛出错误");
        }

        [HttpGet("NotImplementedException")]
        public IActionResult NotImplemented()
        {
            throw new NotImplementedException("未实现的异常");
        }
    }
}
